In [1]:
%load_ext autoreload
%autoreload 2
%matplotlib inline
from smarts import *
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from pypvcell.illumination import Illumination
Load the default setting. This setting is identical to Example 6 except that this setting adds a filter in order to remove the error message.
In [2]:
file = build_smarts_file(
**astmg_173_03_m
)
data = send_to_smarts(file)
plt.plot(data.iloc[:,0],data.iloc[:,1],hold=True)
plt.plot(data.iloc[:,0],data.iloc[:,4])
plt.show()
In [3]:
data.columns
Out[3]:
Compare the results between standard AM1.5d and the SMARTS-generated spectrum
In [4]:
ill=Illumination("AM1.5d")
x,y=ill.get_spectrum("nm")
plt.plot(x,y,hold=True,label="AM1.5d")
plt.plot(data['WVLGTH'],data['BEAM_NORM+'],hold=True,label="SMART")
Out[4]:
In [5]:
ill_g=Illumination("AM1.5g")
x,y=ill_g.get_spectrum("nm")
plt.plot(x,y,hold=True,label="AM1.5g")
plt.plot(data['WVLGTH'],data['GLOBL_TILT'],hold=True,label="SMART")
Out[5]:
In [6]:
data=get_astm_airmass(1.5)
plt.plot(x,y,hold=True,label="AM1.5g")
plt.plot(data['WVLGTH'],data['GLOBL_TILT'],hold=True,label="SMART")
Out[6]:
In [7]:
amass=np.linspace(0.5,3,num=10)
for a in amass:
data=get_astm_airmass(a)
plt.plot(data['WVLGTH'],data['GLOBL_TILT'],hold=True,label='%s'%a)
In [8]:
amass=np.linspace(0.5,3,num=10)
for a in amass:
data=get_astm_airmass(a)
plt.plot(data['WVLGTH'],data['GLOB_HORIZ'],hold=True,label='%s'%a)
In [9]:
data.columns
Out[9]: